<html><head><title>Cipher.pb</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<pre><font face="Courier New, Courier, mono"size="2"><font color="#3A3966">;
</font><font color="#3A3966">; ------------------------------------------------------------
</font><font color="#3A3966">;
</font><font color="#3A3966">;   PureBasic - Cipher example file
</font><font color="#3A3966">;
</font><font color="#3A3966">;    (c) Fantaisie Software
</font><font color="#3A3966">;
</font><font color="#3A3966">; ------------------------------------------------------------
</font><font color="#3A3966">;
</font><font color="#3A3966">;
</font>
<b><font color="#3A3966">CompilerIf</font></b> <font color="#924B72">#PB_Compiler_Unicode</font>
  <b><font color="#3A3966">CompilerError</font></b> &quot;This program should be compiled in ASCII mode (see Compiler/Compiler Option window)&quot;
<b><font color="#3A3966">CompilerEndIf</font></b>

<font color="#3A3966">UseCRC32Fingerprint</font>()
<font color="#3A3966">UseMD5Fingerprint</font>()

<font color="#3A3966">MessageRequester</font>(&quot;CRC32 Test&quot;, &quot;Should be 352441c2 : &quot;+<font color="#3A3966">StringFingerprint</font>(&quot;abc&quot;, <font color="#924B72">#PB_Ascii</font>, <font color="#924B72">#PB_Cipher_CRC32</font>), 0)

<font color="#3A3966">MessageRequester</font>(&quot;MD5 Test&quot;  , &quot;Should be ed50deb5bb795508b8a5c8e50dafa954 : &quot;+<font color="#3A3966">StringFingerprint</font>(&quot;PureBasic&quot;, <font color="#924B72">#PB_Ascii</font>, <font color="#924B72">#PB_Cipher_MD5</font>), 0)

<font color="#3A3966">MessageRequester</font>(&quot;DES Test&quot;  , &quot;Should be FrfWXJ4yTjycc : &quot;+<font color="#3A3966">DESFingerprint</font>(&quot;1Fr&quot;, &quot;Fr&quot;), 0)

*OutputBuffer =<font color="#3A3966"> AllocateMemory</font>(100)
<font color="#3A3966">Base64Encoder</font>(@&quot;PureBasic&quot;,<font color="#3A3966"> Len</font>(&quot;PureBasic&quot;), *OutputBuffer, 100)
<font color="#3A3966">MessageRequester</font>(&quot;Base64 Test&quot;, &quot;Should be UHVyZUJhc2lj : &quot;+<font color="#3A3966">PeekS</font>(*OutputBuffer), 0)</font></pre>
</body></html>
